<template>
    <div class="suspend">
        <div class="img-con mb5" @click="saveAllInfo"  v-if="!allInfoReadOnly && !notOperation">
<!--            <img :src="saveImg" alt=""  >-->
            <el-tooltip class="item fixd_botton_dark" effect="dark" content="保存" placement="left">
                <span  class="fixd_botton"><img :src="saveImg" alt="保存"> </span >
            </el-tooltip>
        </div>
        <div class="img-con mb5" title="建档" v-if="pageSource=='zlxz'" @click="toCreateInfo">
            <el-tooltip class="item fixd_botton_dark" effect="dark" content="建档" placement="left">
                <span  class="fixd_botton"><img :src="createInfoImg" alt="建档"> </span >
            </el-tooltip>
        </div>
        <div class="img-con mb5" title="建档" v-else-if="!allInfoReadOnly" @click="toCreateInfo">
            <el-tooltip class="item fixd_botton_dark" effect="dark" content="建档" placement="left">
                <span  class="fixd_botton"><img :src="createInfoImg" alt="建档"> </span >
            </el-tooltip>
        </div>
        <div class="img-con mb5" v-if="pageSource=='zlxz' && !notOperation" title="资料修正" @click="toEditInfo">
<!--            <img :src="filingImg" alt="" srcset="" >-->
            <el-tooltip class="item fixd_botton_dark" effect="dark" content="资料修正" placement="left">
                <span  class="fixd_botton"><img :src="editInfoImg" alt="资料修正"> </span >
            </el-tooltip>
        </div>
		<div class="img-con mb5"   @click="jump">
		    <el-tooltip class="item fixd_botton_dark" effect="dark" content="返回顶部" placement="left">
		        <span  class="fixd_botton"><img :src="goBackImg" alt=""> </span >
		    </el-tooltip>
		</div>
<!--        <div class="img-con"  @click="back">-->
<!--            <el-tooltip class="item fixd_botton_dark" effect="dark" content="返回" placement="left">-->
<!--                <span  class="fixd_botton"><img :src="goBackImg" alt="返回"> </span >-->
<!--            </el-tooltip>-->
<!--&lt;!&ndash;            <img :src="goBackImg" alt="" srcset=""  >&ndash;&gt;-->
<!--        </div>-->
    </div>
</template>
<script>
import filingImg from '@/assets/img/botton/underwrit.png'; //核保图标
import saveImg from '@/assets/img/botton/preserve.png'; //保存图标
import goBackImg from '@/assets/img/botton/goback.png';//返回图标
import createInfoImg from '@/assets/img/botton/createInfo.png';//建档
import editInfoImg from '@/assets/img/botton/zhaohui.png';//资料修正，照会图标
export default {
    data(){
        return{
            saveImg: saveImg,
            filingImg: filingImg,
            goBackImg: goBackImg,
            createInfoImg:createInfoImg,
            editInfoImg:editInfoImg,
        }
    },
  props: {
    allInfoReadOnly: {
      type: Boolean,
      default: false
    },
    notOperation: {
      type: Boolean,
      default: false
    },
    pageSource: {
      type: String,
      default:""
    }
  },
  methods:{
    saveAllInfo(){
      this.$emit('saveAllInfo');
    },
    toCreateInfo(){
      this.$emit('toCreateInfo');
    },
    toEditInfo(){
      this.$emit('toEditInfo');
    },
    back(){
      this.$emit('back');
    },
	jump(){
	  this.$emit('jump');
	}
  }
}
</script>
<style lang="less" scoped>
    .suspend{
        position: fixed;
        top: 36.5%;
        right: 25px;
        z-index: 1000;
        .img-con{
            width: 40px;
            height: 36px;
            background: rgba(0,0,0,0.4);
            text-align: center;
            line-height: 36px;
            border-radius: 4px;
            cursor: pointer;
            img{
                vertical-align: middle;
                // width: 16px;
                width: 24px;
            }
        }
    }
</style>